<?php
namespace App\Api\Transformers;


use App\Club;
use League\Fractal\TransformerAbstract;

/**
 * Class ClubAllTransformer
 * @package App\Api\Transformers
 */
class ClubAllTransformer extends TransformerAbstract
{

    /**
     * @param Club $club
     * @return array
     */
    public function transform(Club $club)
    {
        $picUrl = "http://yuejian.app/uploads/clubs_pic/clubs/";
        return [
            'club_id' => $club['id'],
            'club_name' => $club['club_name'],
            'club_pic' => $picUrl.$club['club_pic']
        ];
    }
}